{	Problem: http://codeforces.ru/problemset/problem/1/A
	Verdict: Accepted

}
var n,m,a,count,j:int64;
begin
readln(n,m,a);
count:=(n-1) div a+1;
count:=count*((m-1) div a+1);
writeln(count);
end.